#include "my_head.h"

bool Deletenode(p_flight_node head)
{
    char n[20];
    if(head==NULL)
    {
        printf("error\n");
        return false;
    }
    p_flight_node p=head->next;
    p_flight_node x=head;
    printf("请输入你想要删除的航班信息的航班号:");
    scanf("%s",n);
    while(p!=NULL&&strcmp(n,p->data.flight_Number)!=0)
    {
        p=p->next;
        x=x->next;
    }
    if(p!=NULL)
    {
        x->next=p->next;
        free(p);
        return true;
    }else
    {
        printf("未找到该航班信息！\n");
        printf("=============");
        return false;
    }
}